//
//  SwizzTest.swift
//  SwiftUtils
//
//  Created by Ink on 2022/1/26.
//

import Foundation
import UIKit

//for i in 1..<100 {
//    let prefix = "export guaopencard"
//    let suffix = "\(i)=\"true\"\n"
//    print("\(prefix)\(suffix)\(prefix)Run\(suffix)\(prefix)_addSku\(suffix)")
//}

class SwizzleTest {
    
    static let swizzle = Swizzle(SwizzleTest.self) {
        #selector(test(_:)) <-> #selector(swzzleTest(_:))
    }

    func execute() {
        _ = SwizzleTest.swizzle

        test(true)
    }
    
    @objc dynamic func test(_ t:Bool) {
        print(#function)
    }
    
}

extension SwizzleTest {
    @objc func swzzleTest(_ t:Bool) {
        print(#function)
        swzzleTest(t)
    }
}
